<?php
/**
 * Created by PhpStorm.
 * User: jack.shan
 * Date: 2020/9/15
 * Time: 17:24
 */
namespace app\validate;
use think\Validate;

class Userv extends Validate
{
    protected $rule =   [
        'username'  => 'require|length:6,30',
        'password'   => 'require|length:6,20',
        'email' => 'email',
    ];

    protected $message  =   [
        'username.require' => '用户名必须填写',
        'username.length' => '用户名必须6-30个字符',
        'password.require'   => '密码必须填写',
        'password.length'   => '密码必须6-20个字符',
        'email'        => '邮箱格式错误',
    ];

}